﻿<%@ WebHandler Language="C#" Class="statusTable" %>

using System;
using System.Web;

public class statusTable : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        object objstr = null; ;
        try
        {
            string tblName = context.Request.QueryString["tbl"];            
            LibQLKS.NhaHang.NH_DanhSachBan tbl = new LibQLKS.NhaHang.NH_DanhSachBan();
            string strsql = "select cast(IDBan as varchar(20)) +'/' + cast(TinhTrang as varchar(2)) from NH_DanhSachBan where LTrim(Rtrim(MaBan))='" + tblName.Trim() + "'";
            objstr = tbl.GetReturnOne(strsql);
        }
        catch { }

        context.Response.ContentType = "text/plain";
        context.Response.Write(objstr.ToString());
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}